Skip to content

Overhaul cookbook workflows around Jupyter Book 2 and BinderHub#167

Open
agoose77 wants to merge 1 commit into
mainfrom
feat/clinder
Open

Overhaul cookbook workflows around Jupyter Book 2 and BinderHub#167
agoose77 wants to merge 1 commit into
mainfrom
feat/clinder

Conversation

@agoose77
Copy link
Copy Markdown
Collaborator

@agoose77 agoose77 commented Feb 13, 2026

Following from the Statement of Work that 2i2c have authored to build out a replacement for BinderBot, this PR sets up the build action to use the https://github.com/2i2c-org/clinder action. It makes the following changes:

  • Massively simplifies complexity of GitHub Action workflows. Focuses on a smaller set of current-needs.
  • Adds boolean-tag configuration (e.g. run on BinderHub) via myst.yaml tags, validated by a schema.
  • Replaces GitHub Pages PR preview workflows in favour of JupyterBook.pub deployed on the Pythia JS2 Hub. This renders AST builds published by the build workflow.
  • Publishes main branch to GitHub Pages.
  • Breaks environment variable passing to BinderHub. I have suggestions for this, but I think one step at a time.
  • Adds build.sh recognition for custom builds.

The new action simply sets up a BinderHub session and exposes it to the action runner via environment variables (by default). The MyST Document Engine is natively aware of these, and will use them to find the Jupyter Server instead of launching a local one.

I'm testing this over at https://github.com/ProjectPythia/ptype-ml-clinder-test

Note

I had some trouble migrating existing repositories — it seems that most cookbooks are broken in one way, or otherwise need environment variables.

@dcamron
Copy link
Copy Markdown
Contributor

dcamron commented Mar 18, 2026

Should've checked here, huh.
Closes #174

@agoose77 agoose77 changed the title feat: setup action to use clinder Overhaul cookbook workflows around Jupyter Book 2 and BinderHub May 11, 2026
Copy link
Copy Markdown
Member

@brian-rose brian-rose left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I need to spend more time on a deeper dive here, but I really like what I see here so far. I have one specific comment about the hard-coding of the binderhub URL.

# This action sets up evironment variables for e.g. mystmd to recognise and use
uses: 2i2c-org/clinder@action-v1
with:
hub-url: https://binder.projectpythia.org/
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is the one place where I think it would be great to avoid hard-coding the solution, in anticipation of more bespoke project-specific binderhubs and/or use of these workflows outside the scope of Project Pythia.

There is a binderhub URL that lives in the myst config as

project:
  jupyter:
    binder:
      url: https://binder.projectpythia.org/

which is actually defined by default in our upstream config file here.

Is there a simple way to parse the myst config to get this URL?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: In Progress

Development

Successfully merging this pull request may close these issues.

4 participants